home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ntkb.zip / NTKB.EXE / Q106 / 2 / 03.TXT < prev    next >
Text File  |  1993-11-16  |  3KB  |  81 lines

  1. DOCUMENT:Q106203  09-NOV-1993  [W_NT]
  2. TITLE   :FIND.EXE Does Not Return the Proper Errorlevel in Windows NT
  3. PRODUCT :Windows NT
  4. PROD/VER:3.10
  5. OPER/SYS:WINDOWS
  6. KEYWORDS:BUGLIST3.10
  7.  
  8. ----------------------------------------------------------------------
  9. The information in this article applies to:
  10.  
  11.  - Microsoft Windows NT operating system version 3.1
  12.  - Microsoft Windows NT Advanced Server version 3.1
  13. ----------------------------------------------------------------------
  14.  
  15. SYMPTOMS
  16. ========
  17.  
  18. The Find command (FIND.EXE) in Windows does not return the proper
  19. errorlevel. Under MS-DOS, FIND.EXE returns a zero (0) or one (1),
  20. based on whether a string is found in a file. It only returns a zero
  21. under Windows NT.
  22.  
  23. STATUS
  24. ======
  25.  
  26. Microsoft has confirmed this to be a problem in Windows NT version 3.1
  27. and Windows NT Advanced Server version 3.1. We are researching this
  28. problem and will post new information here in the Microsoft Knowledge
  29. Base as it becomes available.
  30.  
  31. MORE INFORMATION
  32. ================
  33.  
  34. Steps to Reproduce Problem
  35. --------------------------
  36.  
  37. 1. Create the following batch file called FINDIT.BAT in the root
  38.    directory of drive C.
  39.  
  40.       @echo off
  41.       find %1 c:\findit.bat
  42.       if errorlevel 1 goto ONE
  43.       if errorlevel 0 goto ZERO
  44.       goto END
  45.       :ONE
  46.       echo Errorlevel is 1, %1 not found
  47.       goto END
  48.       :ZERO
  49.       echo Errorlevel is 0, %1 found
  50.       goto END
  51.       :END
  52.  
  53. 2. Boot to MS-DOS and type the command line FINDIT ONE, FINDIT ZERO,
  54.    FINDIT TWO. 
  55.  
  56.    For the first two commands, it will return errorlevel 0, for the 
  57.    third, it will return 1.
  58.  
  59. 3. Boot to Windows NT and type the same commands. 
  60.  
  61.    All commands will return errorlevel 0.
  62.  
  63. Additional reference words: 3.10 error level
  64. KBCategory:
  65. KBSubcategory: ntap
  66.  
  67. =============================================================================
  68.  
  69. THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS
  70. PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.  MICROSOFT DISCLAIMS
  71. ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES
  72. OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  73. EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR
  74. ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL,
  75. CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF
  76. MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
  77. POSSIBILITY OF SUCH DAMAGES.  SOME STATES DO NOT ALLOW THE EXCLUSION
  78. OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES
  79. SO THE FOREGOING LIMITATION MAY NOT APPLY.
  80.  
  81. Copyright Microsoft Corporation 1993.